﻿using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;

namespace MyERP.Models
{
    /// <summary>
    /// 收款表，实体类
    /// </summary>
    public class Proceeds
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public double PaymentMoney { get; set; }
        public DateTime CreateDateTime { get; set; }
    }
    public class ProceedsConfig : IEntityTypeConfiguration<Proceeds>
    {
        public void Configure(EntityTypeBuilder<Proceeds> builder)
        {
            builder.ToTable("T_Proceeds");
            builder.HasKey(x => x.Id);
            builder.Property(e => e.Id).ValueGeneratedOnAdd();
            builder.Property(e => e.Name).HasMaxLength(20);
        }
    }
}
